---
image: /generated/articles-docs-studio-focus-default-props-path.png
title: focusDefaultPropsPath()
crumb: "@remotion/studio"
---

# focusDefaultPropsPath()<AvailableFrom v="4.0.165"/>

Scrolls to a specific field in the default props editor.

## Example

For the following Zod schema:

```tsx twoslash title="schema.ts"
import { z } from "zod";

const MySchema = z.object({
  array: z.array(
    z.object({
      subfield: z.string(),
    }),
  ),
});
```

Call `focusDefaultPropsPath()` with the path to the field you want to focus on:

```tsx twoslash title="MyComp.tsx"
import { focusDefaultPropsPath } from "@remotion/studio";

focusDefaultPropsPath({
  path: ["array", 0, "subfield"],
});
```

## API

### `path`

The path to the field you want to focus on. An array containing numbers and strings.

### `scrollBehavior`

The behavior of the scrolling.  
One of `"auto" | "instant" | "smooth"`.  
Defaults to the [default scroll behavior](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView).

## See also

- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/studio/src/api/focus-default-props-path.ts)
- [Visual editing](/docs/visual-editing)
